1. Field of the Invention
The present invention relates to an image processing apparatus and, more specifically, to an image processing apparatus for adjusting a gradation range of an input image.
2. Related Art Statement
In an image processing apparatus for synthesizing a plurality of images picked up under different exposure conditions to generate one wide dynamic range image, a technique for adjusting a gradation range is used. For example, in Japanese Patent Application No. 11338551 which has not been published yet, an image processing device for dividing each of images into an appropriate exposure region and an inappropriate exposure region, performing gradation correction for each appropriate exposure region, and synthesizing the appropriate exposure regions of the images subjected to the gradation correction with each other to generate one wide dynamic range image is disclosed. In addition, as an example of an apparatus to which the image processing apparatus is applied, a super latitude digital camera being capable of picking up an image of an object in a wider dynamic range is described.
A gradation converting process in the image processing apparatus described above is performed on the basis of histogram flattening of an edge portion. This histogram flattening is a technique which is based on the assumption that a main object has a large number of edges, and the other portions such as a background have a small number of edges.
On the other hand, in a conventional digital camera, a color difference signal is also converted on the basis of a coefficient obtained when a luminance signal is subjected to gradation conversion. More specifically, it is assumed that a luminance signal Yorg is converted by a gradation conversion characteristic F such that Ytra=F(Yorg) is satisfied. In this case, conventionally, a conversion coefficient gain of a luminance signal is calculated by:gain=Ytra/Yorg, andthe conversion coefficient is directly used to convert color difference signals as follows:Cbtra=gain·Cborg Crtra=gain·Crorg.
In a digital camera, a bit count obtained when an image signal output as an analog signal from a CCD into a digital signal is often a bit count obtained when the image signal is processed and then recorded on, e.g., a recording medium.
In this case, even though a single input image is handled to perform conversion of an amount of information, especially, a reduction of an amount of information, the gradation range of the image may have to be adjusted.
The technique of gradation correction is popularly handled in various devices such as a printer device or a monitor device which is not limited to the digital camera and processes an image. The above technique can be applied to not only a case in which a plurality of images are handled but also a case in which a single input image is handled.
The technique of histogram flattening on the assumption that the main object as described above has a large number of edges can correspond to an object in a relatively wide range. However, the technique cannot completely correspond to the object. As an example which may correspond to the exception, a case in which a person is photographed in a relatively small size on a background having a plurality of shapes or contours is used. At this time, the background is decided as a main object to detect a large number of edges from the background portion, and a gradation range which is assigned to a person is reduced.
In a technique which performs gradation conversion to the color difference signal as described above by using a conversion coefficient equal to the conversion coefficient of a luminance signal, unnatural colors may be generated by a high-luminance portion. More specifically, color reproduction in a color space (e.g., Y, Cb, and Cr space) has a theoretical limit characteristic (see FIG. 11 showing an embodiment of the present invention). The theoretical limit characteristic of the color reproduction is a characteristic in which a color difference range in which colors can be reproduced increases as a luminance Y is increased, and a color difference range in which colors can be reproduced when the luminance exceeds the luminance Y. More specifically, a color reproduction range is narrow because the colors become blackish as a whole at a low luminance, colors in a wide range can be reproduced at an appropriate luminance, and a color reproduction range becomes narrow again because the colors become whitish as a whole at a high luminance.
When gradation conversion is performed like the case of luminance without consideration of the color reproduction range, the color reproduction range is close to or exceeds the limit of the color reproduction range, and colors after the gradation conversion may be whitish. In order to cope with the problem, a process of suppressing a saturation of a high-luminance portion is added in a conventional technique. However, it is not sufficient, and the realization of a technique of more improving color reproduction is desired.